home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / g_man / cat3 / OpenGL-ftn / fglshademodel.z / fglshademodel
Text File  |  1998-10-20  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. ffffggggllllSSSShhhhaaaaddddeeeeMMMMooooddddeeeellll((((3333GGGG))))              OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee              ffffggggllllSSSShhhhaaaaddddeeeeMMMMooooddddeeeellll((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ffffggggllllSSSShhhhaaaaddddeeeeMMMMooooddddeeeellll - select flat or smooth shading
  10.  
  11.  
  12. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      SUBROUTINE ffffggggllllSSSShhhhaaaaddddeeeeMMMMooooddddeeeellll( INTEGER*4 _m_o_d_e )
  14.  
  15.  
  16. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  17.      _m_o_d_e  Specifies a symbolic value representing a shading technique.
  18.            Accepted values are GGGGLLLL____FFFFLLLLAAAATTTT and GGGGLLLL____SSSSMMMMOOOOOOOOTTTTHHHH.  The initial value is
  19.            GGGGLLLL____SSSSMMMMOOOOOOOOTTTTHHHH.
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      GL primitives can have either flat or smooth shading.  Smooth shading,
  23.      the default, causes the computed colors of vertices to be interpolated as
  24.      the primitive is rasterized, typically assigning different colors to each
  25.      resulting pixel fragment.  Flat shading selects the computed color of
  26.      just one vertex and assigns it to all the pixel fragments generated by
  27.      rasterizing a single primitive.  In either case, the computed color of a
  28.      vertex is the result of lighting if lighting is enabled, or it is the
  29.      current color at the time the vertex was specified if lighting is
  30.      disabled.
  31.  
  32.      Flat and smooth shading are indistinguishable for points.  Starting when
  33.      ffffggggllllBBBBeeeeggggiiiinnnn is issued and counting vertices and primitives from 1, the GL
  34.      gives each flat-shaded line segment i the computed color of vertex i+1,
  35.      its second vertex.  Counting similarly from 1, the GL gives each flat-
  36.      shaded polygon the computed color of the vertex listed in the following
  37.      table.  This is the last vertex to specify the polygon in all cases
  38.      except single polygons, where the first vertex specifies the flat-shaded
  39.      color.
  40.  
  41.                        _p_r_i_m_i_t_i_v_e _t_y_p_e _o_f _p_o_l_y_g_o_n i   _v_e_r_t_e_x
  42.                        ____________________________________
  43.                        Single polygon (i == 1)         1
  44.                        Triangle strip                 i+2
  45.                        Triangle fan                   i+2
  46.                        Independent triangle            3i
  47.                        Quad strip                     2i+2
  48.                        Independent quad                4i
  49.  
  50.      Flat and smooth shading are specified by ffffggggllllSSSShhhhaaaaddddeeeeMMMMooooddddeeeellll with _m_o_d_e set to
  51.      GGGGLLLL____FFFFLLLLAAAATTTT and GGGGLLLL____SSSSMMMMOOOOOOOOTTTTHHHH, respectively.
  52.  
  53. EEEERRRRRRRROOOORRRRSSSS
  54.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _m_o_d_e is any value other than GGGGLLLL____FFFFLLLLAAAATTTT or
  55.      GGGGLLLL____SSSSMMMMOOOOOOOOTTTTHHHH.
  56.  
  57.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ffffggggllllSSSShhhhaaaaddddeeeeMMMMooooddddeeeellll is executed between
  58.      the execution of ffffggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ffffggggllllEEEEnnnndddd.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffggggllllSSSShhhhaaaaddddeeeeMMMMooooddddeeeellll((((3333GGGG))))              OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee              ffffggggllllSSSShhhhaaaaddddeeeeMMMMooooddddeeeellll((((3333GGGG))))
  71.  
  72.  
  73.  
  74. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  75.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____SSSSHHHHAAAADDDDEEEE____MMMMOOOODDDDEEEELLLL
  76.  
  77.  
  78. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  79.      ffffggggllllBBBBeeeeggggiiiinnnn, ffffggggllllCCCCoooolllloooorrrr, ffffggggllllLLLLiiiigggghhhhtttt, ffffggggllllLLLLiiiigggghhhhttttMMMMooooddddeeeellll
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.